package cn.icare.cms.model.ro;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.List;

@ApiModel(value = "AddPromotionRO", description = "新增促销规则参数对象类")
public class AddPromotionRO {
    @ApiModelProperty(value = "促销类型:1-商品促销 2-订单促销", required = true)
    private Integer kind;

    @ApiModelProperty(value = "打折类型：1-直接折扣 2-减价(直接单品减价)", required = true)
    private Integer type;

    @ApiModelProperty(value = "促销名称", required = true)
    private String title;

    @ApiModelProperty(value = "折扣率,如0.7代表7折")
    private float rate;
    @ApiModelProperty(value = "降价金额")
    private Integer markdownnum;


    @ApiModelProperty(value = "满足降价条件的金额数")
    private Integer needdownnum;

    @ApiModelProperty(value = "促销开始时间", required = true)
    @JsonFormat(shape=JsonFormat.Shape.STRING,timezone = "GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date starttime;

    @ApiModelProperty(value = "促销结束时间", required = true)
    @JsonFormat(shape=JsonFormat.Shape.STRING,timezone = "GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date endtime;


    @ApiModelProperty(value = "商品Id列表，只有商品促销才需要此参数", required = true)
    private List<Long> items;

    public Integer getKind() {
        return kind;
    }

    public void setKind(Integer kind) {
        this.kind = kind;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public float getRate() {
        return rate;
    }

    public void setRate(float rate) {
        this.rate = rate;
    }

    public Integer getMarkdownnum() {
        return markdownnum;
    }

    public void setMarkdownnum(Integer markdownnum) {
        this.markdownnum = markdownnum;
    }

    public Date getStarttime() {
        return starttime;
    }

    public void setStarttime(Date starttime) {
        this.starttime = starttime;
    }

    public Date getEndtime() {
        return endtime;
    }

    public void setEndtime(Date endtime) {
        this.endtime = endtime;
    }

    public List<Long> getItems() {
        return items;
    }

    public void setItems(List<Long> items) {
        this.items = items;
    }

    public Integer getNeeddownnum() {
        return needdownnum;
    }

    public void setNeeddownnum(Integer needdownnum) {
        this.needdownnum = needdownnum;
    }
}
